<?php
      
   //后台函数库
   
   /**
    * [yumi_type 域名部署模块]
    * @param  [type] $type [description]
    * @return [type]       [description]
    */
   function yumi_type($type){
      if($type==1){
         return "文章";
      }else if($type==2){
         return "分销";
      }else{
         return "未知";
      }
   } 


   function empty_array($array){
      $arr=array();
      foreach ($array as $key=>$v) {
         if(!empty($v['name']) || !empty($v['title'])){
             $arr[$key]=$v;
         }
      }
      return json_encode($arr);
   }

  
  /*
对象数据为数组

*/
function ob2ar($obj) {    if(is_object($obj)) {        $obj = (array)$obj;        $obj = ob2ar($obj);    } elseif(is_array($obj)) {        foreach($obj as $key => $value) {            $obj[$key] = ob2ar($value);        }    }    return $obj;}




?>